/* 引入Element-plus 等需要的依赖 */
import Plugins from './packages'
import type { Component, App } from "vue"
import wdButton, { WdButton } from './packages/wd-button'
import wdTable, { WdTable } from './packages/wd-table'
import wdRow, { WdRow, WdCol } from './packages/wd-row'

function install(app: any, options?: any) {
    app.use(Plugins, options)
    // 注册组件
    Object.keys(components).forEach((key: any) => {
        const component: any = components[key]
        if (component.install) {
            app.use(component)
        }
    })

}



const components: {
    [propName: string]: Component
} = {
    wdRow, wdButton, wdTable
}


// 全部导出
export {
    WdRow, WdCol, WdButton, WdTable
}

export default {
    install
}